package com.biostime.qdingding.modules.qd.service;

import java.util.HashMap;
import java.util.List;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.biostime.qdingding.common.service.CrudService;
import com.biostime.qdingding.modules.qd.dao.CourselevelDao;
import com.biostime.qdingding.modules.qd.entity.Courselevel;

/**
 * 课程阶段Service
 * @author king
 * @version 2015-11-05
 */
@Service
@Transactional(readOnly = true)
public class CourselevelService extends CrudService<CourselevelDao, Courselevel> {

	@Override
	public List<Courselevel> findList(Courselevel entity) {
		dataScopeFilter(entity, "dsf", "id=a.center_id", "id=a.create_by");
		
		return super.findList(entity);
	}
	
//	<!-- ————————————————————————————楚河汉界，谁敢动我的，打死 ————————————————————————————————————-->	
	public List<HashMap<String, Object>> apiFindList(String centerId){
		return dao.apiFindList(centerId);
	}
	
	public List<Integer> apiFindByName(String name,String centerId){
		return dao.apiFindByName(name, centerId);
	}
	
	public Courselevel apiGetById(String levelId){
		return dao.apiGetById(levelId);
	}
}
